package gameCreation;

public class QData {
	String Question, Answer;
	boolean dailyDouble;
	int value;
	
	public QData(String question, String answer, int value, boolean dailyDouble) {
		super();
		Question = question;
		Answer = answer;
		this.dailyDouble = dailyDouble;
		this.value = value;
	}

	@Override
	public String toString() {
		return "QData [Question=" + Question + ", Answer=" + Answer
				+ ", dailyDouble=" + dailyDouble + ", value=" + value + "]";
	}
	
	
	/*
	 * NOTE: the unicode characters below are important
	 * \u001f is the entry delimiter (replacing : and ; in V1.0)
	 * \u001e is the data delimiter (replacing , in V1.0)
	 */
	public String toSaveString(boolean doubleJeopardy) {
		if(doubleJeopardy){
			return "%\u001f" + Question + "\u001e" + Answer + "\u001e" + value + "\u001e" + dailyDouble + "\u001f\r\n";
		}
		else{
			return "#\u001f" + Question + "\u001e" + Answer + "\u001e" + value + "\u001e" + dailyDouble + "\u001f\r\n";
		}
	}

	
	
}
